package superbubble.onegraph;

import superbubble.entry.Graph;
import superbubble.entry.Edge;

public class AdjacencyMatrix {
	private int adjacencyMatrix[][];

	public AdjacencyMatrix() {
		super();
	}
	
	public int [][] getAdjancecncyMatrixForGraph(Graph graph){
		adjacencyMatrix = new int[graph.getNodesNumber()+1][graph.getNodesNumber()+1];
		for(Edge edge : graph.getGraphLinks()){
			adjacencyMatrix[edge.getStartLink()][edge.getEndLink()]=1;
		}
		return adjacencyMatrix;
	}
	
	public void setAdjacencyMatrix(int[][] adjacencyMatrix) {
		this.adjacencyMatrix = adjacencyMatrix;
	}
	
}
